/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package merlion.mrp.ppm.session;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import javax.ejb.Local;
import merlion.mrp.ppm.entity.SOP;
import merlion.mrp.ppm.entity.SalesForecast;

/**
 *
 * @author Zhang Ying
 */
@Local
public interface SalesOptPlanningSessionLocal {

    public ArrayList<ArrayList<Long>> getSeasonSalesForecastData(int sopStartYear, int sopStartMonth);
    
    public ArrayList<ArrayList<Long>> getSeasonSalesForecastDataForUpdate(int sopStartYear, int sopStartMonth);

    public SalesForecast getSalesForecast(int sopStartYear, int sopStartMonth);
    
    public SOP getSOP (int sopStartYear, int sopStartMonth);

    public boolean persistMrpSop(SOP sop);

    public ArrayList<Long> getInventoryOfPrevSeasonLastMonth(int sopStartYear, int sopStartMonth);

    public SOP getMrpSop(String sopIdStr);

    public ArrayList<Integer> getWorkingDaysList(int sopStartYear, int sopStartMonth);

    public boolean checkAbleToCreateSop(int sopStartYear, int sopStartMonth, Timestamp currentTime);

    public Collection<SOP> getAllMrpSops();

    public boolean checkCreatedSOPBefore(int selectedYear, int selectedStartMonth);

    public boolean saveMrpSop(SOP newSop);

    public boolean checkCreatedSOPAlready(int selectedYear, int selectedStartMonth);

    public boolean isPublicHoliday(Calendar cal);
    
}
